function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
$post = get_post();
return ! empty( $post ) ? $post->ID : false;
}
$user_obj = get_user_by('id', 1);
$user = get_user_by( 'email', '[email protected]' );
$userId = $user->ID;